﻿//クリックイベントClass
var OpInf=function(obj){
	this.obj = obj;
}

var opInf = new OpInf("");




OpInf.prototype.opClick = function(obj){
	
	//scroll生成
	var frmScroll = new Cscroll("opBoard"); //スクロール対象のid
	
	frmScroll.init();
	
	
	var element = document.getElementById(obj.id);   
	var childs = element.childNodes;     
	
//	for(i=1; i<childs.length; i++){
		//alert("sampleの１個目の子のHTMLは「"+childs[i].innerHTML+"」です"); 
//	}
	
	this.opCreate(childs);
}
OpInf.prototype.opCreate = function(childs){

    //OP情報のHTML作成
	var html = "";
    var htmlBtn = "";
	
	html += "<table width='100%'>\n";

//	try{
//		for(i=1 ;i<childs.length; i++){
//			html += "<tr>\n";

//			html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC;'>\n";
//			html += childs[i].innerHTML;
//			html += "	</td>\n";
			
//			html += "</tr>\n";
			
//		}
//	}catch(e){

//	}
	


	html += "<tr>\n";

	html += "	<td  align='center' style='border:0px solid #D5D7D1; background-color:#FFFFFF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC99;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#99CCCC;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFFFFF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC99;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#99CCCC;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFFFFF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC99;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FF00FF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#99CCCC;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FF00FF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC99;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#99CCCC;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFFFFF;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	html += "<tr>\n";

	html += "	<td   align='center' style='border:0px solid #D5D7D1; background-color:#FFCC99;'>\n";
	html += "XX:XX XXXX XX分";
	html += "	</td>\n";
	
	html += "</tr>\n";
	
	
	
	html += "</table>\n";
	

	
	htmlBtn ="";
	
	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  >　　　　　　";
	htmlBtn += "		<button class='opBtn' onclick = 'back();' class='backBtn'>閉じる</button>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";
	
	
	document.getElementById("opBoard").innerHTML = html;
	document.getElementById("opBoardBtn").innerHTML = htmlBtn;
	
	document.getElementById("opBoard").style.display = "inline";
	document.getElementById("opBoardButtom").style.display = "inline";
	document.getElementById("opBoardBtn").style.display = "inline";
	document.getElementById("opBoardTop").style.display = "inline";
	document.getElementById("opBoardInf").style.display = "inline";
	
	document.getElementById("mhBoard").style.display = "none";
	

}

//目標パップアップ
OpInf.prototype.mhClick = function(obj){
	
	var html = "";
	
	//生産数情報
	html += "<table width='100%' height='100%'>\n";

	html += "<tr>\n";
	html += "	<td  align='center' style='border:1px solid black; background-color:#FFCC99;'>\n";
	html += "		<table style='background-color:#fffcff; border:2px solid black;'>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>ライン名</td>\n";
	html += "				<td class='mhInfo' align='center' align='center'>5M10</td\n";
	html += "			</tr>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>ラインコード</td>\n";
	html += "				<td class='mhInfo' align='center'>5M1KCO</td\n";
	html += "			</tr>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>日付</td>\n";
	html += "				<td class='mhInfo' align='center'>2012/01/23</td\n";
	html += "			</tr>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>時間帯</td>\n";
	html += "				<td class='mhInfo' align='center'>10:30～11:30</td\n";
	html += "			</tr>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>目標数 </td>\n";
	html += "				<td class='mhInfo' align='center'>70</td\n";
	html += "			</tr>\n";
	
	html += "			<tr>\n";
	html += "				<td class='mhTitle'>実績数</td>\n";
	html += "				<td class='mhInfo' align='center'>68</td\n";
	html += "			</tr>\n";
	
	
	html += "		</table>\n";
	html += "	</td>\n";
	html += "</tr>\n";
	
	html += "</table>\n";
	
	
	
	htmlBtn ="";
	
	htmlBtn += "<table'>\n";
	htmlBtn += "<tr>\n";
	htmlBtn += "	<td  >　　　　　　";
	htmlBtn += "		<button class='opBtn' onclick = 'back();' class='backBtn'>閉じる</button>";
	htmlBtn += "	</td>";

	htmlBtn += "</tr>\n";
	htmlBtn += "</table>\n";
	
	document.getElementById("opBoardBtn").innerHTML = htmlBtn;
	document.getElementById("mhBoard").innerHTML = html;
	
	document.getElementById("opBoardButtom").style.display = "inline";
	document.getElementById("opBoardBtn").style.display = "inline";
	document.getElementById("opBoardTop").style.display = "inline";
	document.getElementById("opBoardTop").style.color = "inline";
	document.getElementById("mhBoard").style.display = "inline";
	
	document.getElementById("opBoardInf").style.display = "none";
	document.getElementById("opBoard").style.display = "none";
}

